package com.wechat.scheme.constant;

import java.text.DecimalFormat;

public class GlobalConstant {

    public static final String TEXT_FRE = "entity no found!";

    public static final Integer NUM_ZERO = 0;

    public static final DecimalFormat PERCENT_DF = new DecimalFormat("0.00");

    public enum ReplyKeyWord{
        //被关注后自动回复
        SUBSCRIBE_REPLY("SUBSCRIBE_REPLY", "感謝關注，如有問題請聯繫管理員。"),
        TEXT_FRE_MV("MV", "未搜到匹配的电影.请回复SK-资源名告知管理员哦"),//电影
        TEXT_FRE_TB("TB", "未搜到匹配的电视局.请回复SK-资源名告知管理员哦"),//电视局
        TEXT_FRE_SK("SK", "感謝反馈，资源更新第一时间通知您。"),//求资源
        TEXT_FRE_UNKOWN("UNKOWN", "sorry.暂时无法满足需求.后期会更新功能."),//求资源
        ;

        public String code;
        public String value;

        ReplyKeyWord(String code, String value) {
            this.code = code;
            this.value = value;
        }
        public static String getValue( String code) {
            for (ReplyKeyWord status : ReplyKeyWord.values()){
                if(status.code.equalsIgnoreCase(code)){
                    return status.value;
                }
            }
            return null;
        }
    }

    public static void main(String[] args) {
        System.out.println(ReplyKeyWord.getValue(ReplyKeyWord.SUBSCRIBE_REPLY.code));
    }

}
